Skip to content

Conversation

noti0na1
Copy link
Member

Fix #23737

@noti0na1 noti0na1 marked this pull request as ready for review August 14, 2025 20:41
Copy link
Contributor

@natsukagami natsukagami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to also include a test like this, to ensure that the subtyping relationship works

import language.experimental.captureChecking

class C

trait A[T]

trait B[Cap^] extends A[C^{Cap}]

def f(c: C^) =
  val b = new B[{c}] {}
  val a: A[C^{c}] = b

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic looks good to me.

@noti0na1 noti0na1 enabled auto-merge August 15, 2025 08:29
@noti0na1 noti0na1 merged commit 8d20b2a into scala:main Aug 15, 2025
48 checks passed
@noti0na1 noti0na1 deleted the fix-23737 branch August 15, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Capture set variable does not work for class parameter
3 participants